var id;

$(function() {
  id = ly.getUrlParam("id");

  $(".form").getForm({
    id: id,
    type: "post",
    ajaxform: "true"
  }, function(data) {
    $("#feedbackUserPhone").val(data.feedbackUserPhone || "未填写");
    $("#createAt").val(changeDate(data.createAt));
  });

});

// 时间戳转换时间
function changeDate(time) {
  var baseDateTime;
  var timestamp = new Date(time);
  baseDateTime = timestamp.toLocaleDateString().replace(/\//g, "-") + " " + timestamp.toTimeString().substr(0, 8)
  if (time != null && time != '') {
    return baseDateTime;
  }
}
